home *** CD-ROM | disk | FTP | other *** search
- #if !defined(AFX_VIEWSEARCH_H__1AE2E5DB_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
- #define AFX_VIEWSEARCH_H__1AE2E5DB_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // ViewSearch.h : header file
- //
-
- /////////////////////////////////////////////////////////////////////////////
- // CViewSearch form view
-
- #ifndef __AFXEXT_H__
- #include <afxext.h>
- #endif
-
- #pragma warning (disable : 4786)
-
- #include <list>
- #include "ListCtrlEx.h"
-
- class CViewSearch : public CFormView
- {
- protected:
- CViewSearch(); // protected constructor used by dynamic creation
- DECLARE_DYNCREATE(CViewSearch)
-
- // Form Data
- public:
- //{{AFX_DATA(CViewSearch)
- enum { IDD = IDD_SEARCH };
- CButton m_btnDownload;
- CEdit m_eSubsearch;
- CEdit m_eExclude;
- CButton m_btnPushRequest;
- CStatic m_stcMatches;
- CStatic m_stcSubsearch;
- CStatic m_stcExclude;
- CListCtrlEx m_lstResults;
- //}}AFX_DATA
-
- // Attributes
- public:
- GUID myGuid;
- CString keyword;
- int length;
- WORD BytesPerSec;
-
- int matches; // total results that came back
-
- void Send_Query();
- void UpdateResults(byte *);
- // Operations
- public:
- void AdjustBottomControl(CWnd* cntl, int bot);
- void ListFromReplies();
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CViewSearch)
- public:
- virtual void OnInitialUpdate();
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
- QueryItem& FindQueryItemFromListIndex(int nItem);
- bool ExcludeTest(CString exclude, CString name);
- void StartDownload(int nItem);
- void AssignHeaderText();
- CGnucleusDoc *Doc;
- CGnuControl *Comm;
-
- int row; // how many results shown -- also number of items in list
- std::list<QueryItem> Replies;
-
- CString subsearchText, excludeText;
-
-
- WORD GetSpeedinBytes(CString);
- POSITION FindQueryPosByHandle(int);
- bool CompareQueries(POSITION, POSITION, int);
- bool InspectFile(CString);
- bool NoScroll;
-
- virtual ~CViewSearch();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- // Generated message map functions
- //{{AFX_MSG(CViewSearch)
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnDblclkListResults(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnButtonDownload();
- afx_msg void OnClickListResults(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnRightClickListResults(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnItemclickListResults(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnColumnclickListResults(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnChangeSubsearch();
- afx_msg void OnChangeExclude();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
-
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
- #endif // !defined(AFX_VIEWSEARCH_H__1AE2E5DB_1AB4_11D4_ACF2_00A0CC533D52__INCLUDED_)
-